<?php

class Application_Form_Grupo extends Zend_Form
{
    
    public function init()
    {

        $this->setMethod('post');
		$this->setAttrib('id', 'ajax_form');


		$this->setDecorators(
			array(	"FormElements",
					array("HtmlTag", array("tag" => "table")),
					"Form"
			)
		);

		$e1=new Zend_Form_Element_Text('grupo');
        $e1 ->setLabel('Grupo')
                ->setRequired(true)
                ->setAttrib('size',150)
                ->addFilter('StringTrim')
                ->addValidator('StringLength', false,array(0, 200));

        $e2=new Zend_Form_Element_TextArea('notas');
        $e2 ->setLabel('Descripción')
                ->setRequired(true)
                ->setAttribs(array('rows'=>2,'cols'=>60))
                ->addFilter('StringTrim')
                ->addValidator('StringLength', false,array(0, 300));
                
                
        $e3=new Sgit_Form_Element_Select_Datacenter('zona');


		$this->addElement($e1)
             ->addElement($e2)
			 ->addElement($e3);
        
       $this->setElementDecorators(array(
		    'ViewHelper',
		   'Errors',
		    array(array('data' => 'HtmlTag'),	array('tag' => 'td', 'class' => 'element')   ),
		    array('Label', array('tag' => 'td')),
		    array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
		));
 
    }
}
